package com.thon.service.project;

import java.util.List;
import java.util.Map;

import com.thon.dao.util.Page;
import com.thon.entity.project.Preferential;

/**
 * @file PreferentialService.java
 * @author yb
 * @description: TODO
 */
public interface PreferentialService {

	public Boolean addPreferential(Preferential Preferential);

	public Boolean updatePreferential(Preferential Preferential);

	void deletePreferential(Integer id);

	public Preferential getPreferential(int userId,int PreferentialId);
	
	public Preferential getPreferential(int PreferentialId);
	
	public Page<Preferential> findAllPreferential(int status,Integer userId,int pageNo,int pageSize,String querySt);
	
	public List<Preferential> listPreferentialByStatus(int status);
 
	public List<Preferential> listPreferentialsBy();

	public Page<Preferential> findPreferentials(int userId,Integer status, int pageNo, int pageSize);

	public Page<Preferential> findPreferentialByAction(int userId, String action,int status,int pageNo, int pageSize);
	
	public Page<Preferential> findPreferentialSort(String by,int pageNo,int pageSize,int userId,int status);
	
	public Page<Preferential> findPreferentialByCategory(int categoryId, int pageNo,int pageSize,int userId,int status);
	
	public Page<Preferential> findPreferentialByRegion(int pageNo,int pageSize,int regionId,int status);

	public Long countPreferential(String by,int status);
	
	public Page<Preferential> findPreferentialByTags(int pageNo,int pageSize,String tags,int userId);
	
	public Preferential getPreferentialByInst(int institutionId,int status);
	
	public List<Preferential> listPreferentialsByStatus(int institutionId,int status);
	
	public Long countPreferentialByStatus(int institutionId,int status);
	
	public Long countPreferentialByCategory(int categoryId);
	
	public List<Preferential> listAllPreferentialName();
	
	public Page<Preferential> findPreferentialByCategory(Page<Preferential>page,int categoryId);
	
	public Page<Preferential> findPreferentialByBenefit(Page<Preferential>page,int benefitId);
	
	public Page<Preferential> findPreferentialByOpen(Page<Preferential>page,int openId);
	
	public Map<Integer,Integer> countCategoryAmount(Map<Integer,Integer> newCategoryAmount);
	
	public Page<Preferential> listPreferential(int pageNo,int pageSize,int status, int projectCategoryId,
			int userId,String tags);
}